<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
  '<div contenteditable dir="ltr">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-0 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">t|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">|t^hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-1 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">th|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">t|h^ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-2 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">the|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">th|e^y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-3 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">the|y^ said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-4 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they| ^said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-5 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they |s^aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-6 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they sa|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they s|a^id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-7 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they sai|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they sa|i^d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-8 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they sai|d^ "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-9 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said| ^"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-10 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said |"^\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-11 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "|\u202B^car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-12 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bc|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202B|c^ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-13 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bca|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bc|a^r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-14 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bca|r^ \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-15 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar| ^\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-16 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar |\u05D3^\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-17 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3|\u05D4^\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-18 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4|\u05D5^ \u05D0\u05D1\u05D2\u202C."</div>',
  '18-19 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5| ^\u05D0\u05D1\u05D2\u202C."</div>',
  '18-20 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0^\u05D1\u05D2\u202C."</div>',
  '18-21 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1^\u05D2\u202C."</div>',
  '18-22 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2^\u202C."</div>',
  '18-23 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|."</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C^."</div>',
  '18-24 ltr backward character');

selection_test(
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.|"</div>',
  selection => selection.modify('extend', 'backward', 'character'),
  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|.^"</div>',
  '18-25 ltr backward character');
</script>
